
.clearfix {
    *zoom: 1;

    &:after {
        content:'';
        display: table;
        clear: both;
    }
}

@mixin link($color, $dct: none) {
    font-size: inherit;
    text-decoration: $dct;
    transition: color $transition;

    &:hover {
        color: $color;
    }
}

@mixin post() {
    word-wrap: break-word;
    overflow-wrap: break-word;

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
        font-weight: bold !important;
    }

    h3 {
        font-size: 1.6em;
    }

    h4 {
        font-size: 1.4em;
    }

    h5 {
        font-size: 1.2em;
    }

    h6 {
        font-size: 1em;
    }

    a, abbr, acronym, address, applet, big, blockquote, caption, cite, code, del, dfn, em, fieldset, img, ins, kbd, label, legend, object, p, q, s, samp, small, span, strike, strong, sub, sup, tt, var {
        vertical-align: baseline;
    }

    h1, h2, h3, h4, h5, h6, blockquote, p, img, ul, ol, dl {
        margin: 0;
        &:not(:last-child) {
            margin-bottom: $main-fs / 2;
        }
    }

    h1, h2, h3, h4, h5, h6 {
        line-height: 1.4;
        font-weight: 400;
        color: $title-fc;
        margin-top: $main-fs * 1.5;
        &:first-child{
            margin-top: 0;
        }
    }

    blockquote {
        padding: 1em;
        position: relative;
        border-left: 5px solid #e4e4e4;
        background-color: rgba(164,177,191,.1);
        overflow: hidden;
    }

    h2 + h4, h3 + h4 {
        margin-top: 0;
        margin-bottom: $main-fs !important;
    }

    a {
        color: $main-color;
        transition: color .2s;
        text-decoration: none;

        &:hover,
        &:active {
            color: $main-color--hover;
            text-decoration: underline;
        }
    }

    .highlight {
        background-color: #272822;
        margin: $main-fs * 1.5 0;
        color: #fff;
        padding: .5em;
        border-radius: 4px;
        -webkit-overflow-scrolling: touch;
        overflow: auto;
        font-size: 12px;

        & + & {
            margin: 10px 0;

            &:last-child {
                margin-bottom: $main-fs * 1.5;
            }
        }

        table {
            width: auto;
            margin: 0;
            border: 0;

            tr {
                td,
                th {
                    border: 0;
                    padding: 0;
                    background-color: transparent !important;
                }
            }
        }

        .line {
            height: 22px;
        }

        .gutter {
            pre {
                min-width: 18px;
                margin-right: .8em;
                text-align: right;
                color: #8f908a;
            }
        }

        .code {padding-left: 10px;
            .tag {
                .name {
                    color: #F92672;
                }
                .attr {
                    color: #74E22E;
                }
                .string {
                    color: #E6DB74;
                }
            }

            .comment {
                color: #75715E;
            }
            .keyword {
                color: #66D9EF;
            }
            .attr {
                color: #E6DB74;
            }
            .literal,
            .number {
                color: #AE81FF;
            }
            .string {
                color: #E6DB74;
            }
            .built_in {
                color: #66D9EF;
            }
            .function {
                color: #66D9EF;

                .params {
                    color: #FD9720;
                }
            }
        }
    }

    code {
        padding: 0 .4em;
        margin: 0;
        background-color: rgba(27,31,35,0.1);
        border-radius: 3px;
        font-weight: 400;
        word-break: break-all;
    }

    hr {
        border: 0;
        border-top: 1px solid #e4e4e4;
        margin: .5em 0 1em;
    }

    img {
        max-width: 100%;

        &:not(:last-child) {
            margin-bottom: 10px;
        }
    }

    table {
        border: 1px solid $border-c;

        th {
            font-weight: 700;
        }

        th,
        td {
            padding: .5em;
            text-align: left;
            border: 1px solid #ddd;
            vertical-align: middle;
        }

        tbody > tr:nth-child(2n+1)>td {
            background-color: rgba(102,128,153,.05);
        }
    }
}
